package com.shiguiwu.springmybatis.designpattern.dutychain.scene;

import java.util.Timer;

/**
 * @description: 击鼓传花场景
 *
 * 一个人在击鼓，另外几个人在传花，击鼓停止，传到谁的手上就行酒令
 *
 * @author: stone
 * @date: Created by 2022/11/7 21:46
 * @version: 1.0.0
 * @pakeage: com.shiguiwu.springmybatis.designpattern.dutychain.scene
 */
public class DrumBeaterTests {

    public static void main(String[] args) {
        Player jiamu = new ActPlayer("贾母");
        Player jiashe = new ActPlayer("贾赦");
        Player jiazheng = new ActPlayer("贾政");
        Player jiabapyu = new ActPlayer("贾宝玉");
        Player jiahuan = new ActPlayer("贾环");
        jiamu.setNext(jiashe);
        jiashe.setNext(jiazheng);
        jiazheng.setNext(jiabapyu);
        jiabapyu.setNext(jiahuan);
        jiahuan.setNext(jiamu);

        //贾母第一个先
        DrumBeater drumBeater = new DrumBeater(jiamu);
        drumBeater.start();

    }
}
